<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="css/index.css">
    <title>苏宁首页flexible-js</title>
</head>

<body>
    <!-- search模块 -->
    <div class="cearch-content">
        <a href="javascript:;" class="search-left"></a>
        <input class="search" type="search" value="rem适配方案2">
        <a href="javascript:;" class="search-right">登录</a>
    </div>
    <!-- swiper轮播图模块 -->
    <div class="lunbotu">
        <!-- Swiper -->
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide">
                    <a href="javascritp:;">
                        <img src="upload/臭宝一号.jpg" alt="">
                        <span>此乃臭宝一号</span>
                    </a>
                </div>
                <div class="swiper-slide">
                    <a href="javascritp:;">
                        <img src="upload/臭宝二号.jpg" alt="">
                        <span>此乃臭宝二号</span>
                    </a>
                </div>
                <div class="swiper-slide">
                    <a href="javascritp:;">
                        <img src="upload/臭宝三号.jpg" alt="">
                        <span>此乃臭宝三号</span>
                    </a>
                </div>
                <div class="swiper-slide">
                    <a href="javascritp:;">
                        <img src="upload/臭宝四号.jpg" alt="">
                        <span>此乃臭宝四号</span>
                    </a>
                </div>
                <div class="swiper-slide">
                    <a href="javascritp:;">
                        <img src="upload/臭宝五号.jpg" alt="">
                        <span>此乃臭宝五号</span>
                    </a>
                </div>
                <div class="swiper-slide">
                    <a href="javascritp:;">
                        <img src="upload/臭宝六号.jpg" alt="">
                        <span>此乃臭宝六号</span>
                    </a>
                </div>
                <div class="swiper-slide">
                    <a href="javascritp:;">
                        <img src="upload/臭宝七号.jpg" alt="">
                        <span>此乃臭宝七号</span>
                    </a>
                </div>

            </div>
        </div>
        <!-- 左右箭头 -->
        <div class="swiper-button-next"></div>
        <div class="swiper-button-prev"></div>

    </div>
    <script src="js/flexible.js"></script>
    <!-- Swiper JS -->
    <script src="js/swiper.min.js"></script>
    <!-- Initialize Swiper -->
    <script>
        // 将轮播图放入到沙箱函数中
        (function() {
            var swiper = new Swiper('.swiper-container', {
                // 显示的图片数量
                slidesPerView: 3,
                // 每个显示的盒子之间的距离
                spaceBetween: 0,
                // 是否让正在显示的图片处于中间显示
                centeredSlides: true,
                loop: true,
                //添加左右箭头
                navigation: {
                    nextEl: ".swiper-button-next",
                    prevEl: ".swiper-button-prev",
                },
            });
        })()
    </script>
</body>

</html>